import http from "@/request/index.js";
const commonParams =
  "orgId=&titles=VendorsDetection,RubbishOverflowDetection,RubbishDetection,storeOperation,dh-traffic-accident,dh-vehicle-breakdowns,wandering-begging,c-fire-exit-occupation-edge";
export const commonApi = {
  //登录接口
  login(data) {
    return http.post(
      "/deepbuilder/deepbuilder-api/framework/auth/login/login-token",
      data,
      {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    );
  },
  //获取系统资源登录信息
  getSystemResourceLoginInfo() {
    return http.get(
      "/deepbuilder/deepbuilder-api/framework/user/resource/system-resource-loginInfo?code=deepbuilder&type="
    );
  },
  //获取预警通知分析今日数据
  getWarningDay() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/srsm/gjqsfx/day?" + commonParams
    );
  },
  //获取预警通知分析7日数据
  getWarningDay7() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/srsm/gjqsfx/day7?" + commonParams
    );
  },
  // /deepmake-api/deepmake/data/v1/cszhzspt/sjczqkcfx/lbt?taskNum=2024011224536&lx=上报
  //轮播图
  getBanner(id) {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqkcfx/lbt?taskNum=${id}&lx=上报`
    );
  },
  //处置流程图片
  getDisposalPhoto(id) {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tp?taskNum=${id}`
    );
  },
  // /deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/sjbllc?relatedId=9666462&id=9666462
  //事件处置详情
  getDisposalDetail(id) {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/sjbllc?relatedId=${id}&id=${id}`
    );
  },
};

//出店经营
export const cdjyApi = {
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=81685`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=81685&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//高空火灾
export const gkhzApi = {
  //获取预警通知分析今日数据
  getWarningDay() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/hzaq/sjjc/sjqs?orgId=1727587283958337538&sjwd=日"
    );
  },
  //获取预警通知分析7日数据
  getWarningDay7() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/hzaq/sjjc/sjqs?orgId=1727587283958337538&sjwd=15日"
    );
  },
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80835,80836,80369`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80835,80836,80369&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//垃圾暴露
export const ljblApi = {
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80799`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80799&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//垃圾桶满溢
export const ljtmyApi = {
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80212`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80212&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//消防占道
export const xfzdApi = {
  //获取消防占道分析
  getWarningDay() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/xfzd/gjfx/gjqsfx?type=1&orgId=1725734231282388993"
    );
  },
  //获取消防占道分析7日数据
  getWarningDay7() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/xfzd/gjfx/gjqsfx/jqt?type=1&orgId=1725734231282388993"
    );
  },
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80189&pageIndex=1&jiedao=`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80189&pageIndex=1&dateType=${dateType}&type=${type}&jiedao=&type2=${type2}`
    );
  },
};
//占道经营
export const zdjyApi = {
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80798`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80798&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//违章停车
export const wztcApi = {
  //预警分析
  getWarningDay() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/lbwt/gjqsfx/jr?orgId=&titles=dh-vehicle-illegal-parking"
    );
  },
  //获取处置全流程分析7日数据
  getWarningDay7() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/lbwt/gjqsfx/jqr?orgId=&titles=dh-vehicle-illegal-parking"
    );
  },
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80832&jiedao=建湘中路`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80832&dateType=${dateType}&type=${type}&type2=${type2}&jiedao=建湘中路`
    );
  },
};

//人员密集
export const rymjApi = {
  //预警分析
  getWarningDay() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/rlmj/rlmdqsfx?orgId=1859162332787216385&sjtype=今日"
    );
  },
  //获取处置全流程分析7日数据
  getWarningDay7() {
    return http.get(
      "/deepmake-api/deepmake/data/v1/cszhzspt/rlmj/rlyc/rlqsfx?orgId=1859162332787216385&sjtype=近7日"
    );
  },
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80190&pageIndex=1&jiedao=青石井巷`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80190&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};
//内涝积水
export const nljsApi = {
  //预警分析
  getWarningDay() {
    return http.get("/deepmake-api/deepmake/data/v1/cszhzspt/qsjs/gjqsfxjr");
  },
  //获取处置全流程分析7日数据
  getWarningDay7() {
    return http.get("/deepmake-api/deepmake/data/v1/cszhzspt/qsjs/gjqsfx/jqr");
  },
  //获取处置全流程分析
  getDisposalData(dateType = "日") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/tj?dateType=${dateType}&sub_type_id=80215,81684`
    );
  },
  //获取处置全流程列表
  getDisposalList(dateType = "日", type = "全部", type2 = "") {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/sjczqlcfx/list?sub_type_id=80215,81684&dateType=${dateType}&type=${type}&type2=${type2}`
    );
  },
};

//流浪乞讨
export const llqtApi = {
  //布控人员
  getBeggarAlarmByPerson() {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/getBeggarAlarmByPerson?personnelId=52&begin=2024-12-31 00:00:00&end=2024-12-31 23:59:59`
    );
  },
  //布控点位
  getBeggarAlarmByPoint() {
    return http.get(
      `/deepmake-api/deepmake/data/v1/cszhzspt/getBeggarAlarmByDevice?deviceId=xxxxS_gb_2d167cc9-57d_43000000002000200909_43010214001310489907&begin=2024-12-31 00:00:00&end=2024-12-31 23:59:59`
    );
  },
};
